package com.xk.pojo;

public class Teacher {
    // 属性对应于Teacher表中的列
    private int teacherID;    // 教师ID
    private String name;      // 姓名
    private String gender;    // 性别
    private String title;     // 职称
    private String email;     // 电子邮箱
    private String phone;     // 联系电话

    // 构造方法
    public Teacher() {
        // 默认构造方法
    }

    // 带参数的构造方法
    public Teacher(int teacherID, String name, String gender, String title, String email, String phone) {
        this.teacherID = teacherID;
        this.name = name;
        this.gender = gender;
        this.title = title;
        this.email = email;
        this.phone = phone;
    }

    // getter 和 setter 方法
    public int getTeacherID() {
        return teacherID;
    }

    public void setTeacherID(int teacherID) {
        this.teacherID = teacherID;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    // 重写toString方法，用于打印Teacher对象信息
    @Override
    public String toString() {
        return "Teacher{" +
                "teacherID=" + teacherID +
                ", name='" + name + '\'' +
                ", gender='" + gender + '\'' +
                ", title='" + title + '\'' +
                ", email='" + email + '\'' +
                ", phone='" + phone + '\'' +
                '}';
    }
}
